home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NOVA - For the NeXT Workstation
/
NOVA - For the NeXT Workstation.iso
/
Apps
/
Utilities
/
Other
/
TimeMon
/
TimeMonWraps.psw
< prev
Wrap
Text File
|
1992-12-26
|
2KB
|
78 lines
/*
TimeMonWraps.psw
Drawing code for use by the Percentages class.
Copyright 1991 Scott Hess. Permission to use, copy, modify, and
distribute this software and its documentation for any purpose
and without fee is hereby granted, provided that this copyright
notice appear in all copies. The copyright notice need not appear
on binary-only distributions - just in source code.
Scott Hess makes no representations about the suitability of this
software for any purpose. It is provided "as is" without express
or implied warranty.
*/
defineps drawInit()
/_doDrawArc1 { %% bdeg ddeg radius
/rad exch def
%% White circle in back.
1.0 setgray
24 24 moveto
24 24 rad 0 360 arc
fill
%% Dark gray "pie" slice.
0.333 setgray
24 24 moveto
24 24 rad 90 4 index arcn
fill
pop
%% Black slice.
0.0 setgray
24 24 moveto
24 24 rad 90 4 index arcn
fill
pop
} bind def
/_doDrawArc2 { %% bdeg ddeg ldeg radius
/rad exch def
%% Background.
1.0 setgray
24 24 moveto
24 24 rad 0 360 arc
fill
%% Light gray slice.
0.666 setgray
24 24 moveto
24 24 rad 90 4 index arcn
fill
pop
%% Dark gray slice.
0.333 setgray
24 24 moveto
24 24 rad 90 4 index arcn
fill
pop
%% Black slice.
0.0 setgray
24 24 moveto
24 24 rad 90 4 index arcn
fill
pop
} bind def
endps
/* These cover for the pre-loaded procedures. */
defineps drawArc1( double radius, bdeg, ddeg)
bdeg ddeg radius _doDrawArc1
endps
defineps drawArc2( double radius, bdeg, ddeg, ldeg)
bdeg ddeg ldeg radius _doDrawArc2
endps